Optimal. Leaf size=131 \[ -\frac {2 d^2 (a+b x)^{-n-1} (c+d x)^{n+1}}{(n+1) (n+2) (n+3) (b c-a d)^3}-\frac {(a+b x)^{-n-3} (c+d x)^{n+1}}{(n+3) (b c-a d)}+\frac {2 d (a+b x)^{-n-2} (c+d x)^{n+1}}{(n+2) (n+3) (b c-a d)^2} \]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 131, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {45, 37} \begin {gather*} -\frac {2 d^2 (a+b x)^{-n-1} (c+d x)^{n+1}}{(n+1) (n+2) (n+3) (b c-a d)^3}-\frac {(a+b x)^{-n-3} (c+d x)^{n+1}}{(n+3) (b c-a d)}+\frac {2 d (a+b x)^{-n-2} (c+d x)^{n+1}}{(n+2) (n+3) (b c-a d)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 37
Rule 45
Rubi steps
\begin {align*} \int (a+b x)^{-4-n} (c+d x)^n \, dx &=-\frac {(a+b x)^{-3-n} (c+d x)^{1+n}}{(b c-a d) (3+n)}-\frac {(2 d) \int (a+b x)^{-3-n} (c+d x)^n \, dx}{(b c-a d) (3+n)}\\ &=-\frac {(a+b x)^{-3-n} (c+d x)^{1+n}}{(b c-a d) (3+n)}+\frac {2 d (a+b x)^{-2-n} (c+d x)^{1+n}}{(b c-a d)^2 (2+n) (3+n)}+\frac {\left (2 d^2\right ) \int (a+b x)^{-2-n} (c+d x)^n \, dx}{(b c-a d)^2 (2+n) (3+n)}\\ &=-\frac {(a+b x)^{-3-n} (c+d x)^{1+n}}{(b c-a d) (3+n)}+\frac {2 d (a+b x)^{-2-n} (c+d x)^{1+n}}{(b c-a d)^2 (2+n) (3+n)}-\frac {2 d^2 (a+b x)^{-1-n} (c+d x)^{1+n}}{(b c-a d)^3 (1+n) (2+n) (3+n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.08, size = 113, normalized size = 0.86 \begin {gather*} -\frac {(a+b x)^{-n-3} (c+d x)^{n+1} \left (a^2 d^2 \left (n^2+5 n+6\right )-2 a b d (n+3) (c n+c-d x)+b^2 \left (c^2 \left (n^2+3 n+2\right )-2 c d (n+1) x+2 d^2 x^2\right )\right )}{(n+1) (n+2) (n+3) (b c-a d)^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.05, size = 0, normalized size = 0.00 \begin {gather*} \int (a+b x)^{-4-n} (c+d x)^n \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 1.01, size = 509, normalized size = 3.89 \begin {gather*} -\frac {{\left (2 \, b^{3} d^{3} x^{4} + 2 \, a b^{2} c^{3} - 6 \, a^{2} b c^{2} d + 6 \, a^{3} c d^{2} + 2 \, {\left (4 \, a b^{2} d^{3} - {\left (b^{3} c d^{2} - a b^{2} d^{3}\right )} n\right )} x^{3} + {\left (a b^{2} c^{3} - 2 \, a^{2} b c^{2} d + a^{3} c d^{2}\right )} n^{2} + {\left (12 \, a^{2} b d^{3} + {\left (b^{3} c^{2} d - 2 \, a b^{2} c d^{2} + a^{2} b d^{3}\right )} n^{2} + {\left (b^{3} c^{2} d - 8 \, a b^{2} c d^{2} + 7 \, a^{2} b d^{3}\right )} n\right )} x^{2} + {\left (3 \, a b^{2} c^{3} - 8 \, a^{2} b c^{2} d + 5 \, a^{3} c d^{2}\right )} n + {\left (2 \, b^{3} c^{3} - 6 \, a b^{2} c^{2} d + 6 \, a^{2} b c d^{2} + 6 \, a^{3} d^{3} + {\left (b^{3} c^{3} - a b^{2} c^{2} d - a^{2} b c d^{2} + a^{3} d^{3}\right )} n^{2} + {\left (3 \, b^{3} c^{3} - 7 \, a b^{2} c^{2} d - a^{2} b c d^{2} + 5 \, a^{3} d^{3}\right )} n\right )} x\right )} {\left (b x + a\right )}^{-n - 4} {\left (d x + c\right )}^{n}}{6 \, b^{3} c^{3} - 18 \, a b^{2} c^{2} d + 18 \, a^{2} b c d^{2} - 6 \, a^{3} d^{3} + {\left (b^{3} c^{3} - 3 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} - a^{3} d^{3}\right )} n^{3} + 6 \, {\left (b^{3} c^{3} - 3 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} - a^{3} d^{3}\right )} n^{2} + 11 \, {\left (b^{3} c^{3} - 3 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} - a^{3} d^{3}\right )} n} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int {\left (b x + a\right )}^{-n - 4} {\left (d x + c\right )}^{n}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.01, size = 318, normalized size = 2.43 \begin {gather*} \frac {\left (a^{2} d^{2} n^{2}-2 a b c d \,n^{2}+2 a b \,d^{2} n x +b^{2} c^{2} n^{2}-2 b^{2} c d n x +2 b^{2} x^{2} d^{2}+5 a^{2} d^{2} n -8 a b c d n +6 a b \,d^{2} x +3 b^{2} c^{2} n -2 b^{2} c d x +6 a^{2} d^{2}-6 a b c d +2 b^{2} c^{2}\right ) \left (b x +a \right )^{-n -3} \left (d x +c \right )^{n +1}}{a^{3} d^{3} n^{3}-3 a^{2} b c \,d^{2} n^{3}+3 a \,b^{2} c^{2} d \,n^{3}-b^{3} c^{3} n^{3}+6 a^{3} d^{3} n^{2}-18 a^{2} b c \,d^{2} n^{2}+18 a \,b^{2} c^{2} d \,n^{2}-6 b^{3} c^{3} n^{2}+11 a^{3} d^{3} n -33 a^{2} b c \,d^{2} n +33 a \,b^{2} c^{2} d n -11 b^{3} c^{3} n +6 a^{3} d^{3}-18 a^{2} b c \,d^{2}+18 a \,b^{2} c^{2} d -6 b^{3} c^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int {\left (b x + a\right )}^{-n - 4} {\left (d x + c\right )}^{n}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.99, size = 525, normalized size = 4.01 \begin {gather*} \frac {x\,{\left (c+d\,x\right )}^n\,\left (a^3\,d^3\,n^2+5\,a^3\,d^3\,n+6\,a^3\,d^3-a^2\,b\,c\,d^2\,n^2-a^2\,b\,c\,d^2\,n+6\,a^2\,b\,c\,d^2-a\,b^2\,c^2\,d\,n^2-7\,a\,b^2\,c^2\,d\,n-6\,a\,b^2\,c^2\,d+b^3\,c^3\,n^2+3\,b^3\,c^3\,n+2\,b^3\,c^3\right )}{{\left (a\,d-b\,c\right )}^3\,{\left (a+b\,x\right )}^{n+4}\,\left (n^3+6\,n^2+11\,n+6\right )}+\frac {a\,c\,{\left (c+d\,x\right )}^n\,\left (a^2\,d^2\,n^2+5\,a^2\,d^2\,n+6\,a^2\,d^2-2\,a\,b\,c\,d\,n^2-8\,a\,b\,c\,d\,n-6\,a\,b\,c\,d+b^2\,c^2\,n^2+3\,b^2\,c^2\,n+2\,b^2\,c^2\right )}{{\left (a\,d-b\,c\right )}^3\,{\left (a+b\,x\right )}^{n+4}\,\left (n^3+6\,n^2+11\,n+6\right )}+\frac {2\,b^3\,d^3\,x^4\,{\left (c+d\,x\right )}^n}{{\left (a\,d-b\,c\right )}^3\,{\left (a+b\,x\right )}^{n+4}\,\left (n^3+6\,n^2+11\,n+6\right )}+\frac {b\,d\,x^2\,{\left (c+d\,x\right )}^n\,\left (a^2\,d^2\,n^2+7\,a^2\,d^2\,n+12\,a^2\,d^2-2\,a\,b\,c\,d\,n^2-8\,a\,b\,c\,d\,n+b^2\,c^2\,n^2+b^2\,c^2\,n\right )}{{\left (a\,d-b\,c\right )}^3\,{\left (a+b\,x\right )}^{n+4}\,\left (n^3+6\,n^2+11\,n+6\right )}+\frac {2\,b^2\,d^2\,x^3\,{\left (c+d\,x\right )}^n\,\left (4\,a\,d+a\,d\,n-b\,c\,n\right )}{{\left (a\,d-b\,c\right )}^3\,{\left (a+b\,x\right )}^{n+4}\,\left (n^3+6\,n^2+11\,n+6\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________